<!DOCTYPE html>
<html>
<head>
    <title>箱子管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="/css/bootstrap-responsive.css" rel="stylesheet" media="screen">
    <link rel="stylesheet" type="text/css" href="/css/style.css">
    <script src="/lib/jq/jquery-2.1.1.min.js"></script>
    <script src="/lib/jq/bootstrap.min.js"></script>
</head>
<body style="margin:15px;">
<legend>箱子商品列表</legend>
<p style="">箱子布局视图</p>
<div style="margin-top: 20px;width: 20%;float: left">
    <%if(box_layout=="一行两列"){%>
    <img src="/images/12.png">
    <%}else if(box_layout=="两行一列"){%>
    <img src="/images/21.png">
    <%}else if(box_layout=="两行两列"){%>
    <img src="/images/22.png">
    <%}else if(box_layout=="一行四列"){%>
    <img src="/images/14.png">
    <%}else if(box_layout=="四行一列"){%>
    <img src="/images/41.png">
    <%}else if(box_layout=="三行两列"){%>
    <img src="/images/32.jpg">
    <%}else if(box_layout=="两行三列"){%>
    <img src="/images/23.png">
    <%}else if(box_layout=="两行四列"){%>
    <img src="/images/24.png">
    <%}else if(box_layout=="四行两列"){%>
    <img src="/images/42.png">
    <%}else if(box_layout=="两行五列"){%>
    <img src="/images/25.png">
    <%}else if(box_layout=="五行两列"){%>
    <img src="/images/52.png">
    <%}else if(box_layout=="四行三列"){%>
    <img src="/images/43.jpg">
    <%}else if(box_layout=="三行四列"){%>
    <img src="/images/34.png">
    <%}%>
</div>
<div style="float: right;width: 80%">
    <table class="table table-bordered" style="margin:20px;width: 90%">
        <tr>
            <td style="text-align: center">门号</td>
            <td style="text-align: center">商品名称</td>
            <td style="text-align: center">淘宝价格</td>
            <td style="text-align: center">活动价格</td>
            <td style="text-align: center">商品图片</td>
            <td style="text-align: center">操作</td>
        </tr>
        <% datas.forEach(function(door){ %>
        <tr>
            <% if(door.prize_id){ %>
            <td style="width: 5%;vertical-align: inherit;"><label style="text-align: center"><%=door.index %></label></td>

            <td style="width: 15%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center" ><%=door.name%></div>
            </td>
            <td style="width: 5%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" ><%=door.price%></div>
            </td>
            <td style="width: 5%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" ><%=door.discount_price%></div>
            </td>
            <td style="width: 20%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" ><img src="<%=door.imgurl%>" style="width: 50px;height: 50px;"/></div>
            </td>
            <td style="width: 20%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" >
                    <a href="/box_management/reBinding?boxid=<%=boxid%>&&index=<%=door.index%>"><input style="width:55px;height:30px;background-color:#DBDBDB;border:1px solid #DBDBDB;border-radius:3px;margin-right:15px;" type="button" value="解绑"></a>
                    <a href="/box_management/edit_Binding?boxid=<%=boxid%>&&index=<%=door.index%>"><input style="width:55px;height:30px;background-color:#DBDBDB;border:1px solid #DBDBDB;border-radius:3px;margin-right:15px;" type="button" value="编辑"></a>
                </div>
            </td>
            <% }else{ %>
            <td style="width: 5%;vertical-align: inherit;"><label style="text-align: center"><%=door.index %></label></td>

            <td style="width: 15%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center" ></div>
            </td>
            <td style="width: 5%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" ></div>
            </td>
            <td style="width: 5%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" ></div>
            </td>
            <td style="width: 20%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" ></div>
            </td>
            <td style="width: 20%;vertical-align: inherit;">
                <div class="gridrow-status" style="text-align: center;" >
                    <a href="/box_management/Binding?boxid=<%=boxid%>&&index=<%=door.index%>"><input style="width:55px;height:30px;background-color:#DBDBDB;border:1px solid #DBDBDB;border-radius:3px;margin-right:15px;" type="button" value="绑定"></a>
                </div>
            </td>
            <% } %>
        </tr>
        <%});%>
    </table>
</div>
</body>
</html>